package lesson06.guess;

import java.util.Scanner;

/**
 * 玩家类
 */
public class Player extends Role{
    private Scanner sc = new Scanner(System.in);
    public Player(){}
    public Player(String name,int score){
        super(name,score);
    }
    /**
     * 玩家出拳
     * @return
     */
    public int input(){
        while(true){
            System.out.println("请选择：0-剪刀 1-石头 2-布");
            int input = sc.nextInt();
            if(input >= 0 && input <= 2){
                return input;
            }
            System.out.println("输入有误，请重新输入");
        }

    }
}
